import React from 'react';
import ReactDOM from 'react-dom';

import { BrowserRouter as Router , Route } from 'react-router-dom'

import Index from './controllers/Index'
import Cart from './controllers/Cart'
import Order from './controllers/Order'
import My from './controllers/My'

// 暂时不支持
// import registerServiceWorker from './registerServiceWorker';


class RouteClass extends React.Component{
    render () {
        return (
            <Router>
                <div>
                    <Route path="/" exact={true} component={Index} />
                    <Route path="/cart" component={Cart} />
                    <Route path="/order" component={Order} />
                    <Route path="/my" component={My} />
                </div>
            </Router>
        )
    }
}

ReactDOM.render((
    <RouteClass/>
), document.getElementById('root'));

// registerServiceWorker();